package test.y2022;

import java.util.regex.Pattern;

/**
 * Created By  醉美柳舞之众星捧月
 *
 * @author song
 * @date 2022/11/11 21:58
 */
public class November2 {

    /* 判断一个数  是否是素数; 是返回1, 不是则返回最小的除数 */

    public static void main(String[] args) {

        String content = "song_2008@126.com";

        String pattern = "/^([a-z]{0,6})+[_]+([0-9]{0,4})+[@126.com]$/";

        boolean isMatch = Pattern.matches(pattern, content);

        System.out.println(isMatch);


        String email = "[a-z]{0,6}+[_]?+[0-9]{0,4}+@[\b126]+\\.[\bcom]+";

        System.out.println(Pattern.matches(email, content));
    }


}
